package com.itheima.controller;

import org.springframework.web.bind.annotation.*;

//@RestController     //  该注解为组合注解，等同于Spring中@Controller+@ResponseBody注解
//public class HelloController {
//    @GetMapping("/hello/{pid}")  // 该注解等同于Spring框架中@RequestMapping(RequestMethod.GET)注解
//    public String hello(@PathVariable ("pid") String id){
//
//        return "student chen";
//    }

@RestController     //  该注解为组合注解，等同于Spring中@Controller+@ResponseBody注解
public class HelloController {
    @GetMapping("/para")  // 该注解等同于Spring框架中@RequestMapping(RequestMethod.GET)注解
    public String para(@RequestParam("U") String U,@RequestParam("P") String P){

        return "username="+U+",password="+P;
    }
}


